package com.example.microservice.common.exception.enums;

/**
 * This is Description
 *
 * @author sun
 * @date 2018/11/14
 * @description 异常类型 描述
 */
public enum ExceptionType {

    BAD_REQUEST_ERROR("400", "Bad request error"),
    INTERNAL_SERVER_ERROR("500", "Unexpected server error"),
    VALIDATION_ERROR("50002", "Found validation issues"),
    MALFORMED_JSON_REQUEST("50003", "Malformed JSON request");

    private String code;
    private String message;

    ExceptionType(String code, String message) {
        this.code = code;
        this.message = message;
    }

    public String getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }

}
